﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin1/SiteAdmin.master" AutoEventWireup="true" CodeFile="Company.aspx.cs" Inherits="admin1_Company" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style>
        .control-group {
            border-top: 1px solid #ffffff;
            border-bottom: 1px solid #eeeeee;
            margin-bottom: 0;
        }

        .control-label {
            padding-top: 15px;
            width: 180px;
            float: left;
            text-align: right;
        }

        .controls {
            margin-left: 200px;
            padding: 10px 0;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="Server">
    <%-- Chinh sua--%>
    <asp:Panel ID="panel_Edit" Width="100%" runat="server" Visible="False">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon">
                        <i class="icon-info-sign"></i>
                    </span>
                    <span class="icon1">
                        <asp:LinkButton ID="lbt_ClosEdit" runat="server" OnClick="lbt_ClosEdit_Click"><img src="img/icons/16/close.png" /></asp:LinkButton>
                    </span>
                    <h5>Chỉnh sửa thông công ty</h5>
                </div>
                <div class="widget-content nopadding">
                    <asp:TextBox ID="txt_CompanyId_Edit" CssClass="NameEdit" runat="server" Visible="false"></asp:TextBox>

                    <div class="control-group">
                        <label class="control-label">Tên công ty</label>
                        <div class="controls">
                            <asp:TextBox ID="txt_Name_Edit" CssClass="NameEdit" runat="server" Width="500"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
                                ErrorMessage="Chưa nhập tên tiếng anh" ControlToValidate="txt_Name_Edit" ValidationGroup="a"></asp:RequiredFieldValidator>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">Địa chỉ</label>
                        <div class="controls">
                            <asp:TextBox ID="txt_Address_Edit" CssClass="NameVnEdit" runat="server" Width="500"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
                                ErrorMessage="Chưa nhập tên tiếng việt" ControlToValidate="txt_Address_Edit" ValidationGroup="a"></asp:RequiredFieldValidator>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">Thành phố</label>
                        <div class="controls">
                            <asp:TextBox ID="txt_City_Edit" CssClass="NameVnEdit" runat="server" Width="500"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                                ErrorMessage="Chưa nhập tên tiếng việt" ControlToValidate="txt_City_Edit" ValidationGroup="a"></asp:RequiredFieldValidator>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">Quốc gia</label>
                        <div class="controls">
                            <asp:TextBox ID="txt_National_Edit" CssClass="NameVnEdit" runat="server" Width="500"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                                ErrorMessage="Chưa nhập tên tiếng việt" ControlToValidate="txt_National_Edit" ValidationGroup="a"></asp:RequiredFieldValidator>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">Email</label>
                        <div class="controls">
                            <asp:TextBox ID="txt_Email_Edit" CssClass="NameVnEdit" runat="server" Width="500"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
                                ErrorMessage="Chưa nhập tên tiếng việt" ControlToValidate="txt_Email_Edit" ValidationGroup="a"></asp:RequiredFieldValidator>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">Số điện thoại</label>
                        <div class="controls">
                            <asp:TextBox ID="txt_Phone_Edit" CssClass="NameVnEdit" runat="server" Width="500"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"
                                ErrorMessage="Chưa nhập tên tiếng việt" ControlToValidate="txt_Phone_Edit" ValidationGroup="a"></asp:RequiredFieldValidator>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">Đường dây nóng</label>
                        <div class="controls">
                            <asp:TextBox ID="txt_HotLine_Edit" CssClass="NameVnEdit" runat="server" Width="500"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server"
                                ErrorMessage="Chưa nhập tên tiếng việt" ControlToValidate="txt_HotLine_Edit" ValidationGroup="a"></asp:RequiredFieldValidator>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label"></label>
                        <div class="controls">
                            <asp:Button ID="btnSaveEdit" runat="server" Text="Save Change" class="btn btn-success" OnClick="btnSaveEdit_Click" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </asp:Panel>
    <%-- Hien thi thong tin --%>
    <div class="row-fluid" style="margin-top: 10px;">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon"><i class="icon-th"></i></span>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-bordered data-table">
                        <thead>
                            <tr>
                                <th>Mã</th>
                                <th>Tên công ty</th>
                                <th>Địa chỉ</th>
                                <th>Thành phố</th>
                                <th>Quốc gia</th>
                                <th>Email</th>
                                <th>Phone</th>
                                <th>Hot line</th>
                                <th>Chức năng</th>
                            </tr>
                        </thead>
                        <tbody>
                            <asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="pu_load">
                                <ContentTemplate>
                                    <asp:Repeater ID="rpt_Category" runat="server">
                                        <ItemTemplate>
                                            <tr class="gradeX">
                                                <td class="center"><%#Eval("CompanyId") %></td>
                                                <td><%#Eval("Name") %></td>
                                                <td><%#Eval("Address") %></td>
                                                <td><%#Eval("City")%></td>
                                                <td><%#Eval("National") %></td>
                                                <td><%#Eval("Email") %></td>
                                                <td><%#Eval("Phone") %></td>
                                                <td><%#Eval("HotLine") %></td>
                                                <td class="center">
                                                    <asp:LinkButton ID="lbt_Edit" CommandArgument='<%#Eval("CompanyId") %>' runat="server" OnClick="lbt_Edit_Click" ToolTip="Chinh sửa"><img src="img/icons/16/create.png" width="16" height="18"/></asp:LinkButton>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
